﻿<!DOCTYPE HTML>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head th:include="admin/head :: head" th:with="title=统计">
</head>
<div class="layuimini-container">
    <div class="layuimini-main">
        <fieldset class="layui-elem-field layuimini-search">
            <legend th:text="${'用户总人数:'+total}"></legend>
        </fieldset>
        <fieldset class="layui-elem-field layuimini-search">
            <legend>定时任务</legend>
            <table class="layui-table">
                <thead>
                <tr class="text-c">
                    <th width="25%">总数</th>
                    <th width="25%">正常</th>
                    <th width="25%">暂停数</th>
                    <th width="25%">异常数</th>
                </tr>
                </thead>
                <tbody>
                <tr class="text-c">
                    <td th:text="${taskCount}" style="color: green"></td>
                    <td th:text="${taskRun}" style="color: green"></td>
                    <td th:text="${taskPause}" style="color: red"></td>
                    <td th:text="${taskError}" style="color: red"></td>
                </tr>
                </tbody>
            </table>
        </fieldset>
        <fieldset class="layui-elem-field layuimini-search">
            <legend>待处理提现</legend>
            <table class="layui-table">
                <thead>
                <tr class="text-c">
                    <th width="30%">币种</th>
                    <th width="35%">笔数</th>
                    <th width="35%">数量</th>
                </tr>
                </thead>
                <tbody>
                <tr class="text-c" th:each="item:${waitList}">
                    <td th:text="${item.currencyName}" style="color: red"></td>
                    <td th:text="${item.quantity}" style="color: red"></td>
                    <td th:text="${item.total}" style="color: red"></td>
                </tr>
                </tbody>
            </table>
        </fieldset>
        <fieldset class="layui-elem-field layuimini-search">
            <legend>今日充值</legend>
            <table class="layui-table">
                <thead>
                <tr class="text-c">
                    <th width="30%">币种</th>
                    <th width="35%">笔数</th>
                    <th width="35%">数量</th>
                </tr>
                </thead>
                <tbody>
                <tr class="text-c" th:each="item:${toDayRechargeList}">
                    <td th:text="${item.currencyName}"></td>
                    <td th:text="${item.total}"></td>
                    <td th:text="${item.totalQuantity}"></td>
                </tr>
                </tbody>
            </table>
        </fieldset>
        <fieldset class="layui-elem-field layuimini-search">
            <legend>总充值</legend>
            <table class="layui-table">
                <thead>
                <tr class="text-c">
                    <th width="30%">币种</th>
                    <th width="35%">笔数</th>
                    <th width="35%">数量</th>
                </tr>
                </thead>
                <tbody>
                <tr class="text-c" th:each="item:${rechargelist}">
                    <td th:text="${item.currencyName}"></td>
                    <td th:text="${item.total}"></td>
                    <td th:text="${item.totalQuantity}"></td>
                </tr>
                </tbody>
            </table>
        </fieldset>
        <fieldset class="layui-elem-field layuimini-search">
            <legend>今日提现</legend>
            <table class="layui-table">
                <thead>
                <tr class="text-c">
                    <th width="30%">币种</th>
                    <th width="35%">笔数</th>
                    <th width="35%">数量</th>
                </tr>
                </thead>
                <tbody>
                <tr class="text-c" th:each="item:${toDayExtractList}">
                    <td th:text="${item.currencyName}"></td>
                    <td th:text="${item.total}"></td>
                    <td th:text="${item.totalQuantity}"></td>
                </tr>
                </tbody>
            </table>
        </fieldset>
        <fieldset class="layui-elem-field layuimini-search">
            <legend>总提现</legend>
            <table class="layui-table">
                <thead>
                <tr class="text-c">
                    <th width="30%">币种</th>
                    <th width="35%">笔数</th>
                    <th width="35%">数量</th>
                </tr>
                </thead>
                <tbody>
                <tr class="text-c" th:each="item:${extractList}">
                    <td th:text="${item.currencyName}"></td>
                    <td th:text="${item.total}"></td>
                    <td th:text="${item.totalQuantity}"></td>
                </tr>
                </tbody>
            </table>
        </fieldset>
    </div>
</div>
<script type="text/javascript" th:inline="javascript">

    function onOffTrade(id, tradeSwitch) {
        $.ajax({
            url: "/admin/redis/onOffTrade",
            data: {"id": id, "changeSwitch": tradeSwitch},
            dataType: "json",
            success: function (data) {
                layer.msg(data.msg, {icon: 1, time: 1000});
                window.location.reload();
            }
        });
    }
</script>
</body>
</html>